\ProvidesPackage{ionyse}

\usepackage[english,francais]{babel}
\usepackage{ulem}
\usepackage{listings}
\usepackage[utf8]{inputenc}
\usepackage{fullpage}
\usepackage[style=altlist,acronym=true,hyper=true]{glossary}
%\makeglossary
%\makeacronym
\usepackage[colorlinks=true]{hyperref}
\hypersetup{urlcolor=blue}
\usepackage[all]{hypcap}
\usepackage{makeidx}
\usepackage{footnote}
\usepackage{fancybox}
\usepackage{graphicx}
\usepackage{placeins}
\usepackage{wrapfig}
\usepackage{textcomp}
\usepackage{multirow} % span multirow tabular
\usepackage[final]{pdfpages} % load the cover in the final PDF

\usepackage{fancyhdr}
\pagestyle{fancy}

% FIXME LEFT PAGE AND RIGHT PAGE SHOULD BE DIFFERENT
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\addtolength{\headheight}{\baselineskip}
\fancyhead{} % clear all header fields
\fancyhead[LE]{\bfseries\leftmark}
\fancyhead[RO]{\bfseries\rightmark}
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[LO,RE]{\textbf{FIMU 2010} - \textit{Rémy Hubscher \& Anwar Rhemimet}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}

\fancypagestyle{plain}{%
  \fancyhead{}
  \renewcommand{\headrulewidth}{0pt}
  %\fancyfoot{} % clear all footer fields
  %\fancyfoot[LE,RO]{\thepage}
}

\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
   \hbox{}
   \vspace*{\fill}
   \begin{center}
     %
   \end{center}
   \vspace{\fill}
   \thispagestyle{plain}
   \newpage
   \if@twocolumn\hbox{}\newpage\fi\fi\fi}

\def\clearemptydoublepage{\clearpage\if@twoside \ifodd\c@page\else
   \hbox{}
   \vspace*{\fill}
   \begin{center}
     %
   \end{center}
   \vspace{\fill}
   \thispagestyle{empty}
   \newpage
   \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother



\setlength\headsep{10pt}

\renewcommand{\chaptermark}[1]{%
	\markboth{\thechapter.\ #1}{}}

\setlength\parskip{1ex}

\newenvironment{intro}{\sffamily}{\newpage}

\newcommand{\image}[3]{
  \vfill{}
  \begin{figure}[!htbp]
    \centerline{\includegraphics[scale=#3]{images/#1}}
    \caption{#2}
    \label{#1}
  \end{figure}
  \vfill{}
}

\newenvironment{code}
{\begin{lstlisting}[frame=leftline,breaklines=true]}
{\end{lstlisting}}

\newcommand{\lookat}[1]{(listing \ref{#1} page \pageref{#1})}

%%%% debut macro %%%%
%% ----------------------------------------------------
%% Copyright (c) 1993 Hydro-Quebec mboyer at robot.ireq.ca
%% ----------------------------------------------------
\makeatletter
%% Bring items closer together in list environments
% Prevent infinite loops
\let\orig@Itemize =\itemize
\let\orig@Enumerate =\enumerate
\let\orig@Description =\description
% Zero the vertical spacing parameters
\def\Nospacing{\itemsep=0pt\topsep=0pt\partopsep=0pt%
\parskip=0pt\parsep=0pt}
% Redefinition de art12.sty pour commencer a la marge de gauche
%\leftmargini 1.2em      % 2.5em

\def\noitemsep{
% Redefine the environments in terms of the original values
\renewenvironment{itemize}{\orig@Itemize\Nospacing}{\endlist}
\renewenvironment{enumerate}{\orig@Enumerate\Nospacing}{\endlist}
\renewenvironment{description}{\orig@Description\Nospacing}%
{\endlist}
}

\def\doitemsep{
% Redefine the environments to the original values
\renewenvironment{itemize}{\orig@Itemize}{\endlist}
\renewenvironment{enumerate}{\orig@Enumerate}{\endlist}
\renewenvironment{description}{\orig@Description}{\endlist}
}
%%%% fin macro %%%%
\makeatother
